package com.ithjh;

import com.ithjh.dao.BookDao;
import com.ithjh.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class app2 {
    public static void main(String[] args) {
        //获取IOC容器
        ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");

        //获取bean
        //BookDao bookDao = (BookDao) app.getBean("bookDao");
        // bookDao.save();

        BookService bookService = (BookService) app.getBean("bookService");
        bookService.save();
    }


}
